package com.orange.score.utils;

import android.content.Context;
import android.os.Handler;
import android.os.Looper;
import android.widget.Toast;

public class ToastUtil
{
  private static Handler handler = new Handler(Looper.getMainLooper());
  private static Object synObj;
  private static Toast toast = null;

  static
  {
    synObj = new Object();
  }

  public static void showMessage(Context paramContext, int paramInt)
  {
    showMessage(paramContext, paramInt, 0);
  }

  public static void showMessage(Context paramContext, int paramInt1, int paramInt2)
  {
    new Thread(new Runnable(paramInt1, paramInt2, paramContext)
    {
      public void run()
      {
        ToastUtil.access$0().post(new Runnable(this, this.val$msg, this.val$len, this.val$act)
        {
          // ERROR //
          public void run()
          {
            // Byte code:
            //   0: invokestatic 36	com/orange/score/utils/ToastUtil:access$1	()Ljava/lang/Object;
            //   3: astore_1
            //   4: aload_1
            //   5: monitorenter
            //   6: invokestatic 40	com/orange/score/utils/ToastUtil:access$2	()Landroid/widget/Toast;
            //   9: ifnull +38 -> 47
            //   12: invokestatic 40	com/orange/score/utils/ToastUtil:access$2	()Landroid/widget/Toast;
            //   15: invokevirtual 45	android/widget/Toast:cancel	()V
            //   18: invokestatic 40	com/orange/score/utils/ToastUtil:access$2	()Landroid/widget/Toast;
            //   21: aload_0
            //   22: getfield 24	com/orange/score/utils/ToastUtil$2$1:val$msg	I
            //   25: invokevirtual 49	android/widget/Toast:setText	(I)V
            //   28: invokestatic 40	com/orange/score/utils/ToastUtil:access$2	()Landroid/widget/Toast;
            //   31: aload_0
            //   32: getfield 26	com/orange/score/utils/ToastUtil$2$1:val$len	I
            //   35: invokevirtual 52	android/widget/Toast:setDuration	(I)V
            //   38: invokestatic 40	com/orange/score/utils/ToastUtil:access$2	()Landroid/widget/Toast;
            //   41: invokevirtual 55	android/widget/Toast:show	()V
            //   44: aload_1
            //   45: monitorexit
            //   46: return
            //   47: aload_0
            //   48: getfield 28	com/orange/score/utils/ToastUtil$2$1:val$act	Landroid/content/Context;
            //   51: aload_0
            //   52: getfield 24	com/orange/score/utils/ToastUtil$2$1:val$msg	I
            //   55: aload_0
            //   56: getfield 26	com/orange/score/utils/ToastUtil$2$1:val$len	I
            //   59: invokestatic 59	android/widget/Toast:makeText	(Landroid/content/Context;II)Landroid/widget/Toast;
            //   62: invokestatic 63	com/orange/score/utils/ToastUtil:access$3	(Landroid/widget/Toast;)V
            //   65: goto -27 -> 38
            //   68: astore_2
            //   69: aload_1
            //   70: monitorexit
            //   71: aload_2
            //   72: athrow
            //
            // Exception table:
            //   from	to	target	type
            //   6	71	68	finally
          }
        });
      }
    }).start();
  }

  public static void showMessage(Context paramContext, String paramString)
  {
    showMessage(paramContext, paramString, 0);
  }

  public static void showMessage(Context paramContext, String paramString, int paramInt)
  {
    new Thread(new Runnable(paramString, paramInt, paramContext)
    {
      public void run()
      {
        ToastUtil.access$0().post(new Runnable(this, this.val$msg, this.val$len, this.val$act)
        {
          // ERROR //
          public void run()
          {
            // Byte code:
            //   0: invokestatic 37	com/orange/score/utils/ToastUtil:access$1	()Ljava/lang/Object;
            //   3: astore_1
            //   4: aload_1
            //   5: monitorenter
            //   6: invokestatic 41	com/orange/score/utils/ToastUtil:access$2	()Landroid/widget/Toast;
            //   9: ifnull +38 -> 47
            //   12: invokestatic 41	com/orange/score/utils/ToastUtil:access$2	()Landroid/widget/Toast;
            //   15: invokevirtual 46	android/widget/Toast:cancel	()V
            //   18: invokestatic 41	com/orange/score/utils/ToastUtil:access$2	()Landroid/widget/Toast;
            //   21: aload_0
            //   22: getfield 25	com/orange/score/utils/ToastUtil$1$1:val$msg	Ljava/lang/String;
            //   25: invokevirtual 50	android/widget/Toast:setText	(Ljava/lang/CharSequence;)V
            //   28: invokestatic 41	com/orange/score/utils/ToastUtil:access$2	()Landroid/widget/Toast;
            //   31: aload_0
            //   32: getfield 27	com/orange/score/utils/ToastUtil$1$1:val$len	I
            //   35: invokevirtual 54	android/widget/Toast:setDuration	(I)V
            //   38: invokestatic 41	com/orange/score/utils/ToastUtil:access$2	()Landroid/widget/Toast;
            //   41: invokevirtual 57	android/widget/Toast:show	()V
            //   44: aload_1
            //   45: monitorexit
            //   46: return
            //   47: aload_0
            //   48: getfield 29	com/orange/score/utils/ToastUtil$1$1:val$act	Landroid/content/Context;
            //   51: aload_0
            //   52: getfield 25	com/orange/score/utils/ToastUtil$1$1:val$msg	Ljava/lang/String;
            //   55: aload_0
            //   56: getfield 27	com/orange/score/utils/ToastUtil$1$1:val$len	I
            //   59: invokestatic 61	android/widget/Toast:makeText	(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
            //   62: invokestatic 65	com/orange/score/utils/ToastUtil:access$3	(Landroid/widget/Toast;)V
            //   65: goto -27 -> 38
            //   68: astore_2
            //   69: aload_1
            //   70: monitorexit
            //   71: aload_2
            //   72: athrow
            //
            // Exception table:
            //   from	to	target	type
            //   6	71	68	finally
          }
        });
      }
    }).start();
  }
}